package com.ty.springbootweb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * User
 *
 * @aurhor Administrator  whs
 * @since 2024/8/28
 */

@Data
@TableName("sys_user")
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {

    @TableId(type = IdType.AUTO)
    @Column(name = "usr_id")
    private Long usrId; // 编号
    @Column(name = "usr_name") // 数据库表中该字段的详情定义
    private String usrName; // 姓名
    @Column(name = "usr_password")
    private String usrPassword; // 密码
    @Column(name = "usr_role_id")
    private Long usrRoleId; // 角色编号
    @Column(name = "usr_flag")
    private Long usrFlag; // 状态

    public User(String usrName, String usrPassword, Long usrRoleId, Long usrFlag) {
        this.usrName = usrName;
        this.usrPassword = usrPassword;
        this.usrRoleId = usrRoleId;
        this.usrFlag = usrFlag;
    }
}
